/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package auditenergetic;
//import com.sun.org.apache.xerces.internal.parsers.SAXParser;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.*;
import org.xml.sax.helpers.*;



public class Date_Beneficiar extends DefaultHandler{


        boolean nume = false;
        boolean prenume = false;
        boolean telefon = false;
        boolean fax = false;
        boolean email = false;
        public static String n = null,p= null,t,f,e;
       
       // boolean age = false;
        @Override
       public void startElement(String nsURI, String strippedName,String tagName, Attributes attributes)
        throws SAXException
        {
            if (tagName.equalsIgnoreCase("nume"))
                nume = true;
            if (tagName.equalsIgnoreCase("prenume"))
                prenume = true;
            if(tagName.equalsIgnoreCase("telefon"))
                telefon = true;
            if (tagName.equalsIgnoreCase("fax"))
                fax = true;
            if (tagName.equalsIgnoreCase("email"))
                email = true;

        }@Override
        public void characters(char[] ch,int start, int length)
        {
            if (nume)
            {
                n =  new String(ch,start,length);

                nume = false;
            } else if (prenume)
            {
                p = new String(ch,start,length);
                prenume = false;
            } else if (telefon)
            {

                t = new String(ch,start,length);
                telefon = false;
            }else if(email)
            {
                 e = new String(ch,start,length);
                 email = false;
            }
        }
        public static String printN()
        {
            return n+"/"+p+"/"+t+"/"+e;
            
        }
      
        
      
    }



